import { http } from '@/utils/http'

/** GET 请求 */
export const getDetails = (id: any) => {
  return http.get<any>(`/business/article/getById/${id}`)
}

export const getLikes = (data: any) => {
  return http.post<any>('/business/likes/add', data)
}

export const favorites = (data: any) => {
  return http.post<any>('/business/favorites/add', data)
}

export const commentAdd = (data: any) => {
  return http.post<any>('/business/comments/add', data)
}

export const commentList = (data: any) => {
  return http.get<any>(`/business/comments/list`, data)
}

// 真删除
export const doDel = (id: any) => {
  return http.delete<any>(`/business/comments/${id}`)
}
